import random

s = input().split(" ")
n = int(s[0])
m = int(s[1])
slots = [0] * m


def countPath(path):
    count = 0
    for c in path:
        if c == 'R':
            count += 1
    return count


for i in range(n):
    path = ""
    for j in range(m - 1):
        if random.randint(0, 1) == 0:
            path += "L"
        else:
            path += "R"
    print(path)
    slots[countPath(path)] += 1

for num in slots:
    print(num, end=" ")
